package com.alliky.home.ui.viewmodel;

import android.app.Application;
import android.content.Intent;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.alliky.core.base.viewmodel.ToolbarViewModel;
import com.alliky.core.binding.command.BindingCommand;
import com.alliky.core.data.DataRepository;
import com.alliky.core.global.Global;

/**
 * ================================================
 *
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2023/1/9 13:55
 * ================================================
 */
public class HomeGoodsDetailsViewModel extends ToolbarViewModel<DataRepository> {

    public ObservableField<String> btnName = new ObservableField<String>("");

    public HomeGoodsDetailsViewModel(@NonNull Application application) {
        super(application);
    }

    public void initToolbar() {
        setTitleText("商品详情");
    }

    public BindingCommand onClickButton = new BindingCommand(() -> {
        Intent intent = new Intent();
        intent.putExtra(Global.KEY.TITLE, "点击按钮");
        setResult(intent);
    });
}
